<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
	<head>  
		<meta http-equiv="content-type"  content="text/html;charset=UTF-8" />  
		<title> 
			<% if controller.action_name == "preview" %>
				default rTemplate - preview
			<% else %>
				Resume : <%=h @resume.name %>
			<% end %>
		</title>  
	</head> 
	<body> 

		<style type="text/css">
		h1{ margin: 0;}
		h2{ margin-bottom: 0.25cm }
		h3{ margin: 0;}
		p{ 	margin: 0;
			font: normal normal normal 12pt "Times New Roman";	
			/* text-align: justify; */
		}

		.part {
			/*border: 1px solid black; */
			padding-bottom: 0 cm
			clear: both
		}
		.subpart {
			page-break-inside: aviod;
		}
		.container{
			width: 21cm;		/* a4 size: 210mmX297mm */
			border: 1px solid black;
		}

		.inner-container{
			margin: 1.5cm;
		}
		.name h1{
			border-bottom: 0.1cm solid black;
		}
		.contact table{
			width: 100%;
		}
		.contact .address {
			float: left;
		}
		.contact .email {
			text-align: right;
		}
		.contact .phone_nos {
			text-align: right;
		}
		.experiences .subpart{
			padding-top: 0cm;
			padding-bottom: 0.2cm;
		}
		.experiences table{
			width: 100%;
		}
		.experiences .exp_title{
			width: 40%;
		}
		.experiences .duration{
			width: 30%;
		}
		.experiences .company{
			text-align: right;
		}
		</style>

		<div class="container"><div class="inner-container">

			<div class="name part">
				<h1><%=h @resume.name %></h1>
			</div>

			<% if @resume.contact %>
			<div class="contact part">
					<div class="address">
						<b>Address</b>
						<p><%=h @resume.contact.address %></p>
					</div>
					<div>
						<div class="email">
							<b>Email</b>
							<p><%=h @resume.contact.emails %><p>	
						</div>	
						<div class="phone_nos">
							<b>Phone no.</b>
							<p><%=h @resume.contact.phone_nos %></p>
						</div>	
					</div>	
			</div>
			<% end  # if %>

			<% if @resume.profile %>
			<div class="profile part">
				<h2>Profile</h2>
				<p><%=h @resume.profile.profile_text %></p>
			</div>
			<% end %>

			<% if @resume.skills.size !=0 %>
			<div class="skills part">
				<h2>Skills</h2>
				<table>
					<% @resume.skills.each do |skill| %>
					<tr>
						<td><b><%=h skill.skill_name %></b></td>
						<td><%=h skill.skill_remarks %></td>
						<td><%=h skill.skillset_type %></td>
					</tr>
					<% end %>
				</table>		
			</div>
			<% end %>
			
			<% if @resume.educations.size !=0 %>
			<div class="education part">
				<h2>Education</h2>
				<% @resume.educations.each do |education| %>
					<div class="subpart">
						<span><%=h education.level %>,</span>
						<span><%=h education.major %>,</span>
						<span><%=h education.score %>,</span>
						<span><%=h education.college %></span>
						<span class="more_info"><%=h education.more_info %></span>
					</div>	
				<% end %>
			</div>
			<% end %>

			<% if @resume.experiences %>
			<div class="experiences part">
				<h2>Experience</h2>
				<% @resume.experiences.each do |experience| %>
					<div class="subpart">
						<table>	<tr>
							<td class="exp_title">	<b><%=h experience.title %>		</b></td>
							<td class="duration">	<b><%=h experience.duration %>	</b></td>
							<td class="company">	<b><%=h experience.company %>	</b></td>					
						</tr></table>	
						<p class="role"><%=h experience.role %>				</p>
						<p class="more_info"><%=h experience.more_info %>	</p>
					</div>
				<% end %>
			</div>
			<% end %>

			<% if @resume.achievement %>
			<div class="achievements part">
				<h2>Achievements</h2>
				<p><%=h @resume.achievement.achievements_text %></p>
			</div>
			<% end %>

			<% if @resume.hobby %>
			<div class="hobbies part">
				<h2>Hobbies</h2>
				<p><%=h @resume.hobby.hobbies_text %></p>
			</div>
			<% end %>

		</div></div>

		<script type="text/javascript" src="/javascripts/jquery-1.3.2.js"></script>
		<script type="text/javascript" src="/javascripts/resume_common.js"></script>
		<script type="text/javascript" src="/javascripts/show_p.js"></script>

	</body>
</html>	
	